package com.jsptags.navigation.pager;

import javax.servlet.jsp.JspException;

// Referenced classes of package com.jsptags.navigation.pager:
//			PageTagSupport

public abstract class SkipTagSupport extends PageTagSupport {

	private boolean ifnull;

	public final void setIfnull(boolean flag) {
		ifnull = flag;
	}

	public final boolean getIfnull() {
		return ifnull;
	}

	protected abstract boolean skip();

	public int doStartTag() throws JspException {
		super.doStartTag();
		if (!skip()) {
			if (!ifnull)
				return 0;
			removeAttributes();
		}
		return 1;
	}

	public void release() {
		ifnull = false;
		super.release();
	}

	public SkipTagSupport() {
		ifnull = false;
	}
}
